<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 500px;
            height: 500px;
            border: 2px solid black;
            margin: 100px auto;
            /* 显示为弹性盒
            1.可让子元素默认横向排列
            2.行内元素会变为块级元素 */
            display: flex;
        }
        .box div{
            width: 100px;
            height: 100px;
            border: 1px solid red;
        }
        .box span{
            width: 100px;
            height: 100px;
            border: 1px solid red;
            /* 弹性盒时且只有一个元素，可水平垂直居中 */
            margin: auto;
        }
    </style>
</head>
<body>
    <div class="box">
        <!-- <div>111</div>
        <div>222</div>
        <div>333</div>
        <div>444</div> -->
        <span>555</span>
    </div>
</body>
</html>